home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14165 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: ix.netcom.com!news
  2. From: identd@ix.netcom.com(none )
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help on:Printing to Printer from within c / c++ program
  5. Date: 11 Apr 1996 23:53:46 GMT
  6. Organization: Netcom
  7. Message-ID: <4kk62a$csh@dfw-ixnews4.ix.netcom.com>
  8. References: <316a58d0.5945808@nntp.ix.netcom.com> <4kjqjf$3g5@nadine.teleport.com>
  9. NNTP-Posting-Host: sea-wa11-16.ix.netcom.com
  10. X-NETCOM-Date: Thu Apr 11  6:53:46 PM CDT 1996
  11.  
  12. In <4kjqjf$3g5@nadine.teleport.com> GHouck <hksys@teleport.com> writes:
  13.  
  14. >
  15. >cmalinow@ix.netcom.com (Chris Malinowski) wrote:
  16. >>Newbie requires help.
  17. >>Trying to read in a seq file from disk, and print on the printer.
  18. >>OPEN of input file works ok, but am having difficulty opening the
  19. >>output file as the printer device.
  20. >>System is Dos/ Windows 3.1
  21. >>Borland c++ 3.1
  22. >>Redirect is out of the question, must perform the file open from
  23. >>withing the progam.
  24. >>
  25. >Chris,
  26. >
  27. >Since you're using DOS/Windows, you should be able to fopen and
  28. >fprintf to the device called 'PRN' or 'LPT1,2,...'  If I remember
  29. >correctly, there is also a standard device called 'stdprn', analogous
  30. >to the streams for 'stdin', 'stdout', 'stderr' .  Perhaps not.
  31. >Yours, Geoff Houck
  32. >
  33.  
  34. you are correct.  fopen() to open the file and fprintf with stdprn as
  35. the stream will do it. 
  36.  
  37. tyler
  38.  
  39.  
  40.